package com.mg.yygh.hosp.controller;

import com.baomidou.mybatisplus.extension.api.R;
import com.mg.yygh.common.result.Result;
import com.mg.yygh.hosp.service.DepartmentService;
import com.mg.yygh.vo.hosp.DepartmentQueryVo;
import com.mg.yygh.vo.hosp.DepartmentVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author M_Dragon
 * @date 2022/9/2/002 16:12
 */
@Api(tags = "科室信息")
@RestController
@RequestMapping("/admin/hosp/department/")
//@CrossOrigin
public class DepartmentController {

    @Autowired
    private DepartmentService departmentService;

    @ApiOperation(value = "查询所有科室信息")
    @GetMapping("getDeptList/{hoscode}")
    public Result getDeptList(@PathVariable("hoscode") String hoscode){
        List<DepartmentVo> list =  departmentService.getDeptList(hoscode);
        return Result.ok(list);
    }
}
